///////////////////////////////////////////////////////////////////////////////
group { name: "elm/ctxpopup/bg/noblock";
   parts {
      part { name: "base"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
         }
      }
   }
}

group { name: "elm/ctxpopup/bg/default";
   parts {
      part { name: "base"; type: RECT;
         description { state: "default" 0.0;
            color: 255 255 255 0; // no cc
            color_class: "/dim/normal/hover";
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 255; // no cc
         }
      }
   }
   programs {
      program { signal: "mouse,clicked,*"; source: "base";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
      program { signal: "elm,state,show"; source: "elm";
         action: STATE_SET "visible" 0.0;
         transition: SINUSOIDAL 0.3;
         target: "base";
      }
      program { signal: "elm,state,hide"; source: "elm";
         action: STATE_SET "default" 0.0;
         transition: SINUSOIDAL 0.5;
         target: "base";
      }
   }
}

group { name: "elm/ctxpopup/base/default";
   parts {
      part { name: "base"; type: RECT;
         clip_to: "clip";
         description { state: "default" 0.0;
            color_class: "/dim/normal/ctxpopup";
         }
      }
      part { name: "elm.swallow.background"; type: SWALLOW;
         clip_to: "clip";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "base";
         }
      }
      part { name: "elm.swallow.content"; type: SWALLOW;
         clip_to: "clip";
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "base";
            rel1.offset:  8  8;
            rel2.offset: -9 -9;
            offscale;
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "clip"; type: RECT;
         description { state: "default" 0.0;
            color: 255 255 255 0; // no cc
            visible: 0;
            rel1.offset: -200 -200;
            rel2.offset:  199  199;
            fixed: 1 1;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 255; // no cc
            visible: 1;
         }
      }

      part { name: "arrow_area_left"; type: SPACER;
         scale : 1;
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 0;
            align: 0.75 0.5;
            rel.to: "base";
            rel1.offset: -5 0;
            rel2.offset: -5 -1;
            rel2.relative: 0.0 1.0;
            offscale;
         }
      }
      part { name: "elm.swallow.arrow_left"; type: SWALLOW; mouse_events: 0;
         scale : 1;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_left";
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
         }
      }

      part { name: "arrow_area_right"; type: SPACER;
         scale : 1;
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 0;
            align: 0.25 0.5;
            rel.to: "base";
            rel1.offset: 4 0;
            rel1.relative: 1.0 0.0;
            rel2.offset: 4 -1;
            offscale;
         }
      }
      part { name: "elm.swallow.arrow_right"; type: SWALLOW; mouse_events: 0;
         scale : 1;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_right";
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
         }
      }

      part { name: "arrow_area_up"; type: SPACER;
         scale : 1;
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
            align: 0.5 0.75;
            rel.to: "base";
            rel1.offset: 0 -5;
            rel2.offset: -1 -5;
            rel2.relative: 1.0 0.0;
            offscale;
         }
      }
      part { name: "elm.swallow.arrow_up"; type: SWALLOW; mouse_events: 0;
         scale : 1;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_up";
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
         }
      }

      part { name: "arrow_area_down"; type: SPACER;
         scale : 1;
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
            align: 0.5 0.25;
            rel.to: "base";
            rel1.offset: 0 4;
            rel1.relative: 0.0 1.0;
            rel2.offset: -1 4;
            offscale;
         }
      }
      part { name: "elm.swallow.arrow_down"; type: SWALLOW; mouse_events: 0;
         scale : 1;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_down";
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
         }
      }
   }
   programs {
      program { signal: "elm,state,show"; source: "elm";
         action: STATE_SET "visible" 0.0;
         transition: SINUSOIDAL 0.1;
         target: "clip";
         target: "event";
      }
      program { signal: "elm,state,hide"; source: "elm";
         action: STATE_SET "default" 0.0;
         transition: SINUSOIDAL 0.3;
         target: "clip";
         target: "event";
         after: "hide2";
      }
      program { name: "hide2";
         action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
      }

   }
}

group { name: "elm/ctxpopup/arrow/default";
   parts {
      part { name: "base";
         scale: 1;
         description { state: "default" 0.0;
            min: 15 15;
            fixed: 1 1;
            image.normal: "i-arrow-l";
            color_class: "/fg/normal/ctxpopup/arrow";
         }
         description { state: "left" 0.0;
            inherit: "default" 0.0;
            image.normal: "i-arrow-l";
         }
         description { state: "right" 0.0;
            inherit: "default" 0.0;
            image.normal: "i-arrow-r";
         }
         description { state: "top" 0.0;
            inherit: "default" 0.0;
            image.normal: "i-arrow-u";
         }
         description { state: "bottom" 0.0;
            inherit: "default" 0.0;
            image.normal: "i-arrow-d";
         }
      }
   }
   programs {
      program { signal: "elm,state,left"; source: "elm";
         action: STATE_SET "left" 0.0;
         target: "base";
      }
      program { signal: "elm,state,right"; source: "elm";
         action: STATE_SET "right" 0.0;
         target: "base";
      }
      program { signal: "elm,state,top"; source: "elm";
         action: STATE_SET "top" 0.0;
         target: "base";
      }
      program { signal: "elm,state,bottom"; source: "elm";
         action: STATE_SET "bottom" 0.0;
         target: "base";
      }
   }
}
